package com.aaa.web.service.impl.secondcarserviceimpl;


import com.aaa.entity.secondcar.SecondCarTransferRecordMessage;
import com.aaa.web.commons.SecondCarTransferRecordQuery;
import com.aaa.web.dao.secondcardao.SecondCarTransferRecordDao;
import com.aaa.web.service.secondcarservice.SecondCarTransferRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
* @program: ${PROJECT_NAME}
* @description: 二手车交易记录界面
* @author: 许一鑫
* @create: 10:20 2019/1/3
**/
@Service
public class SecondCarTransferRecordServiceImpl implements SecondCarTransferRecordService {
    @Autowired
    private SecondCarTransferRecordDao dao;

    /**查询所有二手车交易记录,搜索，分页*/
    @Override
    public Map getCarTransferRecordMessage(SecondCarTransferRecordQuery query) {
        Map m = new HashMap();
        List<SecondCarTransferRecordMessage> list =dao.getcartransferRecordMessage(query);
        m.put("data",list);
        m.put("count",dao.getcartransferRecordcount(query));
        m.put("code",0);
        m.put("msg","");
        return m;

    }
}
